package com.gzist.security4.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gzist.security4.domain.Permission;
import com.gzist.security4.domain.Role;
import com.gzist.security4.service.RoleService;
import com.gzist.security4.mapper.RoleMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Set;

/**
 * @author 黄泽建
 * @description 针对表【role】的数据库操作Service实现
 * @createDate 2024-05-14 00:46:24
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role>
        implements RoleService {

    @Resource
    private RoleMapper roleMapper;

    @Override
    public List<Permission> getPermissionByRoleId(Long id) {
        return roleMapper.getPermissionByRoleId(id);
    }

    @Override
    public List<Permission> getPermissionByRoleIds(Set<Long> roleIds) {
        return roleMapper.getPermissionByRoleIds(roleIds);
    }
}




